package com.security.controller;

import com.security.domain.bo.R;
import com.security.service.impl.AccountServiceImpl;
import jakarta.annotation.Resource;
import jakarta.mail.MessagingException;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户模块 Controller
 *
 * @author DblSun
 */
@RestController
public class AccountController {
    @Resource
    private AccountServiceImpl accountService;

    // 发送验证码
    @GetMapping("/captcha")
    public R<String> captcha(@RequestParam String phone) throws MessagingException {
        return accountService.sendCaptcha(phone);
    }


}
